package com.sunfield.myglide;

import android.widget.ImageView;

import com.bumptech.glide.DrawableTypeRequest;
import com.bumptech.glide.load.resource.drawable.GlideDrawable;
import com.bumptech.glide.request.target.Target;

/**
 * Created by wxl on 2017/2/7.
 */

public class MyDrawableTypeRequest {
    DrawableTypeRequest mDrawableTypeRequest;

    public MyDrawableTypeRequest(DrawableTypeRequest mDrawableTypeRequest) {
        this.mDrawableTypeRequest = mDrawableTypeRequest;
    }

    public DrawableTypeRequest getmDrawableTypeRequest() {
        return mDrawableTypeRequest;
    }

    public Target<GlideDrawable> into(ImageView imageView){
        return mDrawableTypeRequest.error(R.drawable.error_image).into(imageView);
    }
}
